* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.logo h1 {
    color: #2c3e50;
    margin: 0;
    font-size: 24px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

#userInfo {
    display: flex;
    align-items: center;
    gap: 15px;
}

#username {
    color: #333;
    font-weight: 500;
    margin: 0 5px;
}

.logout-btn {
    color: #666;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.login-btn {
    color: #1890ff;
    text-decoration: none;
    padding: 5px 15px;
    border: 1px solid #1890ff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background-color: #1890ff;
    color: white;
}

.settings-btn {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    padding: 5px 10px;
    border-radius: 4px;
}

.settings-btn:hover {
    color: #3498db;
    background-color: #f0f0f0;
}

.subtitle {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-section, .output-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.form-tip {
    color: #95a5a6;
    font-size: 13px;
    margin-top: 6px;
    margin-bottom: 0;
    line-height: 1.4;
}

/* 输入框通用样式 */
input[type="text"],
input[type="password"],
input[type="url"],
input[type="email"],
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    color: #2c3e50;
    background-color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="url"]::placeholder,
input[type="email"]::placeholder {
    color: #95a5a6;
    font-size: 14px;
}

/* 密码输入框特殊样式 */
.secret-input {
    display: flex;
    gap: 10px;
    position: relative;
}

.secret-input input {
    flex: 1;
    padding-right: 45px;
}

.toggle-secret-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    font-size: 18px;
    color: #95a5a6;
    transition: color 0.3s;
    z-index: 1;
}

.toggle-secret-btn:hover {
    color: #3498db;
}

/* 设置页面特定样式 */
.settings-form {
    margin-top: 30px;
}

.settings-form .form-group:last-of-type {
    margin-bottom: 0;
}

/* 输入框悬停效果 */
input[type="text"]:hover,
input[type="password"]:hover,
input[type="url"]:hover,
input[type="email"]:hover,
select:hover {
    border-color: #bdc3c7;
}

/* 禁用状态样式 */
input:disabled,
select:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.7;
}

/* 错误状态样式 */
input.error,
select.error {
    border-color: #e74c3c;
}

input.error:focus,
select.error:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

/* 成功状态样式 */
input.success,
select.success {
    border-color: #2ecc71;
}

input.success:focus,
select.success:focus {
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.15);
}

button {
    background-color: #3498db;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.preview {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.loading.active {
    display: block;
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
    font-size: 24px;
}

.login-subtitle {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 30px;
    font-size: 16px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7f8c8d;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-submit-btn:hover {
    background-color: #2980b9;
}

.register-link {
    text-align: center;
    margin-top: 20px;
    color: #7f8c8d;
}

.register-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

.back-home {
    display: inline-block;
    color: #7f8c8d;
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-home:hover {
    color: #3498db;
    text-decoration: none;
}

.auth-code-input {
    display: flex;
    gap: 10px;
}

.auth-code-input input {
    flex: 1;
}

.get-auth-code-btn {
    background-color: #f8f9fa;
    color: #3498db;
    border: 1px solid #3498db;
    padding: 0 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.get-auth-code-btn:hover {
    background-color: #3498db;
    color: #fff;
}

.get-auth-code-btn:disabled {
    background-color: #f8f9fa;
    color: #95a5a6;
    border-color: #ddd;
    cursor: not-allowed;
}

/* 二维码弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    position: relative;
    min-width: 300px;
    max-width: 90vw;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.modal-title {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 500;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    color: #95a5a6;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close-btn:hover {
    color: #3498db;
}

.qr-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #eee;
    margin: 0 auto;
    display: block;
    background-color: #fff;
    padding: 10px;
}

/* 设置页面样式 */
.settings-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.settings-box {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

.settings-box h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
    font-size: 24px;
}

.settings-subtitle {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 30px;
    font-size: 16px;
}

.form-tip {
    color: #95a5a6;
    font-size: 12px;
    margin-top: 5px;
    margin-bottom: 0;
}

.secret-input {
    display: flex;
    gap: 10px;
}

.secret-input input {
    flex: 1;
}

.toggle-secret-btn {
    background: none;
    border: none;
    padding: 0 10px;
    cursor: pointer;
    font-size: 16px;
    color: #7f8c8d;
    transition: color 0.3s;
}

.toggle-secret-btn:hover {
    color: #3498db;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.save-btn, .test-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.save-btn {
    background-color: #3498db;
    color: white;
}

.save-btn:hover {
    background-color: #2980b9;
}

.test-btn {
    background-color: #f8f9fa;
    color: #3498db;
    border: 2px solid #3498db;
}

.test-btn:hover {
    background-color: #3498db;
    color: white;
}

.article-content {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-height: 200px;
    outline: none;
}

.article-content:focus {
    box-shadow: 0 0 0 2px #3498db;
}

.edit-tip, .save-tip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 14px;
    animation: fadeIn 0.3s ease;
}

.edit-tip {
    background-color: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.save-tip {
    background-color: #2ecc71;
    color: white;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* 编辑模式下的样式 */
.article-content[contenteditable="true"] {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 20px;
}

.article-content[contenteditable="true"]:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 编辑按钮样式 */
#editBtn {
    background-color: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #ddd;
}

#editBtn:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

#saveBtn {
    background-color: #2ecc71;
    color: white;
}

#saveBtn:hover {
    background-color: #27ae60;
}

/* 确保按钮图标对齐 */
.action-btn i {
    margin-right: 5px;
    font-size: 14px;
}

.article-title {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.article-paragraph {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
    text-align: justify;
}

.article-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#copyBtn {
    background-color: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #ddd;
}

#copyBtn:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

#publishBtn {
    background-color: #3498db;
    color: white;
}

#publishBtn:hover {
    background-color: #2980b9;
}

.placeholder-text {
    color: #95a5a6;
    text-align: center;
    padding: 40px 0;
    font-size: 16px;
}

.preview {
    max-height: 600px;
    overflow-y: auto;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* 自定义滚动条样式 */
.preview::-webkit-scrollbar {
    width: 8px;
}

.preview::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.preview::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.preview::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: #666;
    font-size: 16px;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 添加过渡效果 */
.article-content {
    transition: opacity 0.3s ease;
}

.article-content.hidden {
    opacity: 0;
}

/* 优化加载状态的显示 */
.preview {
    position: relative;
    min-height: 200px;
}

/* 确保加载动画居中显示 */
.loading-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
} 